﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ReservoirBLL;
using ReservoirModel;

namespace ReservoirManger
{
    public partial class Record : System.Web.UI.Page
    {
        //定义为公共字段 供前台调用
        public string UserId;
        public string Name;
        protected void Page_Load(object sender, EventArgs e)
        {
            //读取用户资料
            TBUser users = IdentityManager.ReadUser();
            Name = users.Name;
            UserId = users.Id;

            //接收解码后Cookie中的姓名、ID值   UrlDecode(解码)
            //Name = HttpUtility.UrlDecode(Request.Cookies["Name"].Value);
            //UserId = Request.Cookies["ID"].Value;

            //调用方法 给GridView控件绑定数据源
            UserBLL userBLL = new UserBLL();
            List<TBRecord> info = userBLL.GetInfo(UserId);
            GridView1.DataSource = info;    
            GridView1.DataBind();   
        }
    }
}